package com.sy.mapper.allocate;

import com.sy.bean.allocate.AllocateDetail;
import com.sy.common.crud.IMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AllocateDetailMapper extends IMapper<AllocateDetail> {
    /**
     * 根据tbId查询调拨详情
     * @param tbId 调拨id
     * @return 调拨详情
     */
    List<AllocateDetail>queryByTbId(int tbId);
    /**
     * 批量删除调拨单明细
     * @param ids 调拨单ids
     * @return 行数
     */
    int batchDelete(@Param("ids") List<Integer>ids);
    /**
     * 批量删除调拨单明细
     * @param ids 调拨单明细ids
     * @return 行数
     */
    int batchByDelete(@Param("ids") List<Integer>ids);

    /**
     * 批量新增调拨单明细
     * @param tbId 调拨id
     * @param allocateDetailList 调拨明细
     * @return 成败
     */
    int batchSave(@Param("tbId")int tbId,@Param("allocateDetailList")List<AllocateDetail> allocateDetailList);

    /**
     * 根据调拨id删除调拨单明细
     * @param tbId 调拨id
     * @return 行数
     */
    int deleteByTbId(int tbId);
}
